package com.qingcheng.service.order;
import com.qingcheng.entity.PageResult;
import com.qingcheng.pojo.order.OrderAndOrderItem;
import com.qingcheng.pojo.order.Order;

import java.util.*;

/**
 * order业务逻辑层
 */
public interface OrderService {


    public List<Order> findAll();


    public PageResult<Order> findPage(int page, int size);


    public List<Order> findList(Map<String,Object> searchMap);


    public PageResult<Order> findPage(Map<String,Object> searchMap,int page, int size);


    public Order findById(String id);

    /**
     * 返回订单号和金额
     * @param order
     * @return
     */
    public Map<String,Object> add(Order order);


    public void update(Order order);


    public void delete(String id);

    /**
     * 根据id查找组合实体类
     * @param orderId
     * @return
     */
    public OrderAndOrderItem findOrderDetails(String orderId);

    /**
     * 批量发货
     * @param ids
     * @return
     */
    public List<Order> queryOrderStatus(String[] ids);

    /**
     * 批量发货
     * @param orderList
     */
    public void updateOrderStatus(List<Order> orderList);

    /**
     * 退货
     * @param orderId1
     * @param orderId2
     */
   public void mergeOrder(String orderId1, String orderId2);

    /**
     * 订单超时处理
     */
   public void orderTimeOutLogic();

    /**
     * 修改订单状态
     * @param orderId
     * @param transactionId
     */
    public void updatePayStatus(String orderId, String transactionId);
}
